package com.RMP
{
    import flash.display.*;
    import flash.text.*;
    import com.greensock.*;

    public class ShortText extends MovieClip
    {
        public var field:TextField;
        public var myXMLList:XML;
        public var objName:String = "ShortText";
        var fadeSpeed:Number;
        public var dbId:Object;
        public var btnOver:Sprite;
        public var idNum:Number;
        public var textFormat:Object;
        public var btn:Sprite;
        var myRoot:MovieClip;
        var myText:String;

        public function ShortText(param1:MovieClip, param2:String, param3:int) : void
        {
            objName = "ShortText";
            myRoot = param1;
            myText = param2;
            idNum = param3;
            buildField();
            return;
        }

        function buildField() : void
        {
            textFormat = new TextFormat();
            textFormat.font = new HelveticaLightEmbed().fontName;
            textFormat.size = 14;
            textFormat.letterSpacing = 0;
            textFormat.leading = -4;
            textFormat.leftMargin = 0;
            textFormat.rightMargin = 0;
            textFormat.color = myRoot.coldColor;
            btnOver = new Sprite();
            btnOver.useHandCursor = true;
            btnOver.mouseEnabled = true;
            btnOver.buttonMode = true;
            btnOver.graphics.beginFill(10066329, 0);
            btnOver.graphics.drawRect(0, 0, 1, 1);
            btnOver.graphics.endFill();
            addChild(btnOver);
            btn = new Sprite();
            btn.useHandCursor = true;
            btn.mouseEnabled = true;
            btn.buttonMode = true;
            btn.mouseChildren = false;
            field.autoSize = "left";
            field.antiAliasType = AntiAliasType.ADVANCED;
            field.gridFitType = GridFitType.PIXEL;
            field.selectable = false;
            field.embedFonts = true;
            field.multiline = true;
            field.htmlText = myText;
            field.setTextFormat(textFormat);
            field.y = -1;
            btn.addChild(field);
            addChild(btn);
            return;
        }

        public function checkFilters(param1:String) : Boolean
        {
            var _loc_2:XMLList = null;
            _loc_2 = myXMLList.filters.id;
            if (_loc_2.contains(param1))
            {
                return true;
            }
            return false;
        }

        public function fadeInShell() : void
        {
            TweenMax.to(this, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

    }
}
